package com.ruibang.glass.purchase.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 采购合同信息表
 * </p>
 *
 * @author mameng
 * @since 2024-03-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(description = "采购合同信息表")
@TableName(value = "g_purchase_contracts")
public class PurchaseContracts extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "序号")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "合同类型")
    private String contractType;

    @ApiModelProperty(value = "供应商")
    private String supplierId;

    @ApiModelProperty(value = "供应商名称")
    private String supplierName;

    @ApiModelProperty(value = "采购项目")
    private String purchaseItem;

    @ApiModelProperty(value = "项目编号")
    private String projectNumber;

    @ApiModelProperty(value = "合同编号")
    private String contractNumber;

    @ApiModelProperty(value = "合同名称")
    private String contractName;

    @ApiModelProperty(value = "合同金额")
    private BigDecimal contractAmount;

    @ApiModelProperty(value = "付款方式")
    private String paymentMethod;

    @ApiModelProperty(value = "签订日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private LocalDate signingDate;

    @ApiModelProperty(value = "合同负责人")
    private String contractResponsiblePerson;

    @ApiModelProperty(value = "是否废止1:否,2:是")
    private String deleteStatus;

    @ApiModelProperty(value = "废止原因")
    private String deleteReason;

    @ApiModelProperty(value = "签章状态 1:未上传 2:已上传")
    private String qzStatus;

    @ApiModelProperty(value = "合同负责人")
    private String contractResponsiblePersonId;

    @ApiModelProperty(value = "开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private LocalDateTime startDate;

    @ApiModelProperty(value = "结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private LocalDateTime endDate;

    @ApiModelProperty(value = "收货人")
    private String receiver;

    @ApiModelProperty(value = "收货人名称")
    @TableField(exist = false)
    private String receiverName;

    @ApiModelProperty(value = "收货人电话")
    private String receiverPhone;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "审批Id")
    private String approveId;

    @TableField(exist = false)
    @ApiModelProperty(value = "商品信息")
    private List<PurchaseContractProducts> purchaseContractProductsList;

    @TableField(exist = false)
    @ApiModelProperty(value = "合同附件上传Id")
    private List<String> htfjFileIdList;

    @TableField(exist = false)
    @ApiModelProperty(value = "增补说明上传Id")
    private List<String> zbsmFileIdList;

    @TableField(exist = false)
    @ApiModelProperty(value = "增补附件上传Id")
    private List<String> zbfjFileIdList;

    @TableField(exist = false)
    @ApiModelProperty(value = "签章合同上传Id")
    private List<String> qzhtFileIdList;

    @TableField(exist = false)
    @ApiModelProperty(value = "废除文件上传")
    private List<String> deleteFileList;

    @ApiModelProperty(value = "合同类型 1—-为新增合同 2---新增增补合同")
    private String useContractType;

    @TableField(exist = false)
    @ApiModelProperty(value = "删除id")
    private List<String> ids;

    @ApiModelProperty(value = "状态")
    @TableField(exist = false)
    private String status;

    @ApiModelProperty(value = "状态")
    @TableField(exist = false)
    private String createUserId;

    @ApiModelProperty(value = "流程Id")
    @TableField(exist = false)
    private String processId;

    @ApiModelProperty(value = "审批状态0：新建，1：审批中，2：已审批")
    private String approveStatus;

    @ApiModelProperty(value = "审批节点")
    @TableField(exist = false)
    private String nodeName;

    @ApiModelProperty(value = "审批人")
    @TableField(exist = false)
    private String approveUser;

    @ApiModelProperty(value = "审批人Id")
    @TableField(exist = false)
    private String approveUserId;

    @ApiModelProperty(value = "菜单Id")
    @TableField(exist = false)
    private String menuId;

    @ApiModelProperty(value = "是否增补(0:否,1:是)")
    private String isSupplement;

    @ApiModelProperty(value = "是否删除(0:否,1:是)")
    @TableLogic
    private String isDelete;

}
